<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>登陆</title>

    <!-- Bootstrap -->
    <link href="/Public/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">


    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->

</head>
<body>

<div class="container">

    <h1 style="text-align: center"> 管理员登陆</h1>

    <hr/>
    <div class="row">
        <form class="form-horizontal" action="/Admin/user/login" method="post">
            <div class="form-group">
                <label for="inputEmail3" class="col-sm-3 control-label">用户名:</label>
                <div class="col-sm-7">
                    <input type="text" class="form-control" name="username" id="inputEmail3" placeholder="输入用户名">
                </div>
            </div>
            <div class="form-group">
                <label for="inputPassword3" class="col-sm-3 control-label">用户密码:</label>
                <div class="col-sm-7">
                    <input type="password" class="form-control" name="password" id="inputPassword3"
                           placeholder="输入用户密码">
                </div>
            </div>
            <div class="form-group">
                <label for="code" class="col-sm-3 control-label">验证码</label>
                <div class="col-sm-3">
                    <input type="text" class="form-control" name="code" id="code" placeholder="请输入验证码">
                </div>
                <div>
                    <img src="<?php echo U('verify');?>" alt="验证码" id="verify" style="cursor:pointer"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-offset-3 col-sm-5">
                    <div class="checkbox">
                        <label>
                            <input type="checkbox" name="rem" value="1"> 记住密码
                        </label>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-offset-6 ">
                    <button type="submit" class="btn btn-primary">提交</button>
                </div>
            </div>
        </form>

        <a href="<?php echo U('register');?>">还没有账号，立即注册</a>
    </div>
</div>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="/Public/vendor/js/jquery-3.2.0.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="/Public/vendor/bootstrap/js/bootstrap.min.js"></script>
<!--这里的js只是为了在登陆界面上点击验证码图片的时候能够刷新！！！-->
<script>
    $(function(){

       $("#verify").click(function(){
           var src = "<?php echo U('verify');?>?"+Math.random();
           $("#verify").attr('src',src);
       })
    });
</script>
</body>
</html>